package com.demo.service.impl;

import com.demo.dao.IOfferDao;
import com.demo.dao.IOrderDao;
import com.demo.dao.LadingOrderMapper;
import com.demo.entity.LadingOrder;
import com.demo.service.ILadingOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by byte2 on 2017-03-20.
 */
@Service
@Transactional
public class LadingOrderServiceImpl implements ILadingOrderService {
    @Autowired
    private LadingOrderMapper dataDao;
    @Autowired
    private IOrderDao orderDao;
    @Autowired
    private IOfferDao offerDao;


    @Override
    public int deleteByPrimaryKey(Integer id) {
        return dataDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(LadingOrder record) {
        return dataDao.insert(record);
    }

    @Override
    public int insertSelective(LadingOrder record) {
        return dataDao.insertSelective(record);
    }

    @Override
    public LadingOrder selectByPrimaryKey(Integer id) {
        return dataDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(LadingOrder record) {
        return dataDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(LadingOrder record) {
        return dataDao.updateByPrimaryKey(record);
    }

    @Override
    public int addBatch(List<LadingOrder> list) {
        return dataDao.addBatch(list);
    }

    @Override
    public List<LadingOrder> selectByLadingId(String ladingId) {
        return dataDao.selectByLadingId(ladingId);
    }
}
